<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>教务员管理</title>
		<link href="extjs/resources/css/ext-all.css" rel="stylesheet"
			type="text/css" />
		<link href="extjs/resources/css/xtheme-gray.css" rel="stylesheet"
			type="text/css" />
		<script type="text/javascript" src="extjs/ext-base.js"></script>
		<script type="text/javascript" src="extjs/ext-all-debug.js"></script>
		<script type = "text/javascript">
			/*性别数据*/
	var proxy = new Ext.data.MemoryProxy(
	[
		["male","男"],
		["female","女"]
	]
	);
	
	var reader = new Ext.data.ArrayReader({},[
		{name:"gender",type:"string",mapping:0},
		{name:"name",type:"string",mapping:1}
	]);
	
	var store = new Ext.data.Store({
		proxy:proxy,
		reader:reader,
		autoLoad:true//自动加载数据，否则手动调用store.load();
	});
		
	var teacherAddForm = new Ext.form.FormPanel({
		region:'center',
		title:"教师添加",
		width:400,
		autoheight:true,
		frame:true,
		labelAlign:"right",
		defaultType:"textfield",
		items:[
			{
						name:"username",//与action中的参数一致
						fieldLabel:"Name"
					},{
						name:"password",
						fieldLabel:"Password",
						inputType:"password"
					}
		]
		});
		
		Ext.onReady(function(){	
		
			Ext.BLANK_IMAGE_URL = "extjs/resources/images/default/s.gif";
		
			Ext.QuickTips.init();	
			
			var viewPort = new Ext.Viewport({
					layout : 'fit',
					items : [teacherAddForm]　　　            
				});
		});
		</script>
	</head>
	<body>
	<div id="teacherAddMenu"></div>
	</body>
</html>
